<?php 

      $listid		= gpc_getStringArray("listid");
      $liststatus	= gpc_getStringArray("liststatus");
	  $listorder	= gpc_getStringArray("listorder");
	  $listprice	= gpc_getStringArray("listprice");
	  $listname		= gpc_getStringArray("listname");
      $id			= gpc_getIntPost("id");
		

      $countlist = count($listid);
      
      for ($i = 0; $i < $countlist; $i ++)
      {     	
      	$sql_update = "UPDATE  tblproduct SET 
      				  iStatus	 = '$liststatus[$i]',
					  iOrder   ='$listorder[$i]',
					  cPrice	= '$listprice[$i]',
					  cName		= '$listname[$i]'
      				  WHERE  iId = $listid[$i]";
      
      	$dbsql->query($sql_update);
     }
     
     

      $cActions = " Update Status Product";
	  Insert_Tracking($cActions);
	
	  
      $msg = "Update Product Status Success !";
      page_transfer($msg,$pagetr);

      exit();

?>
